#include "StdAfx.h"
#include "Degree.h"
#include "Radian.h"

VAMPIRE_NAMESPACE_BEGIN

Vampire::Degree Degree::operator+( const Degree& rhs ) const
{
	return Degree(mData + rhs.mData);
}

Vampire::Degree Degree::operator+( const Real& rhs ) const
{
	return Degree(mData + rhs);
}

Vampire::Degree Degree::operator-( const Degree& rhs ) const
{
	return Degree(mData - rhs.mData);
}

Vampire::Degree Degree::operator-( const Real& rhs ) const
{
	return Degree(mData - rhs);
}

Vampire::Degree Degree::operator*( const Degree& rhs ) const
{
	return Degree(mData * rhs.mData);
}

Vampire::Degree Degree::operator*( const Real& rhs ) const
{
	return Degree(mData * rhs);
}

Vampire::Degree Degree::operator/( const Degree& rhs ) const
{
	return Degree(mData / rhs.mData);
}

Vampire::Degree Degree::operator/( const Real& rhs ) const
{
	return Degree(mData / rhs);
}

Degree& Degree::operator+=( const Degree& rhs )
{
	mData += rhs.mData;
	return *this;
}

Degree& Degree::operator+=( const Real& rhs )
{
	mData += rhs;
	return *this;
}

Degree& Degree::operator-=( const Degree& rhs )
{
	mData -= rhs.mData;
	return *this;
}

Degree& Degree::operator-=( const Real& rhs )
{
	mData /= rhs;
	return *this;
}

Degree& Degree::operator*=( const Degree& rhs )
{
	mData *= rhs.mData;
	return *this;
}

Degree& Degree::operator*=( const Real& rhs )
{
	mData *= rhs;
	return *this;
}

Degree& Degree::operator/=( const Degree& rhs )
{
	mData /= rhs.mData;
	return *this;
}

Degree& Degree::operator/=( const Real& rhs )
{
	mData /= rhs;
	return *this;
}

void Degree::operator=( const Degree& rhs )
{
	mData = rhs.mData;
}

void Degree::operator=( const Real& rhs )
{
	mData = rhs;
}

bool Degree::operator==( const Degree& rhs ) const
{
	return mData == rhs.mData ? true : false;
}

bool Degree::operator!=( const Degree& rhs ) const
{
	return mData == rhs.mData ? false : true;
}

Vampire::Degree Degree::operator+() const
{
	return *this;
}

Vampire::Degree Degree::operator-() const
{
	return Degree(-mData);
}

Vampire::Radian Degree::toRadian() const
{
	return Radian(mData * 180.0f / PI);
}

VAMPIRE_NAMESPACE_END
